<?php
// +----------------------------------------------------------------------
// | Author: July
// +----------------------------------------------------------------------
// | 创建时间: 2023-12-27 20:39:42
// +----------------------------------------------------------------------
// | 操作日志模型
// +----------------------------------------------------------------------

namespace july\julyadmin\common\model;

use think\Model;

class OperationLog extends Model
{
    //主键
    protected $pk = 'id';
    //设置自动时间写入类型
    protected $autoWriteTimestamp = 'datetime';
    //设置创建时间字段
    protected $createTime = 'create_time';

    /**
     * 管理员
     * @Author   July
     * @DateTime 2024-01-13T20:13:44+0800
     */
    public function admin()
    {
        return $this->hasOne(Admin::class, 'id', 'userid');
    }
}
